The QuickTime VR Manager provides a function that you can use to install an intercept procedure. Your intercept procedure can provide either alternative or additional functionality to that provided by the intercepted procedure.
You can use the QTVRInstallInterceptProc function to install or remove an intercept procedure for a QuickTime VR Manager function.
OSErr QTVRInstallInterceptProc (
QTVRInstanceqtvr,
QTVRProcSelectorselector,
QTVRInterceptUPPinterceptProc,
SInt32refCon,
UInt32 flags);
The QTVRInstallInterceptProc function installs the procedure specified by the interceptProc parameter as an intercept procedure for the QuickTime VR function specified by the selector parameter for the QuickTime VR movie specified by the qtvr parameter. Your intercept procedure is called whenever QuickTime VR is about to execute the function you are intercepting. Your procedure can simply replace the intercepted function (by returning the value true in its cancel parameter); it can call through to the intercepted function (by calling the QTVRCallInterceptedProc function); or it can allow the intercepted function to execute when the intercept procedure returns (by returning the value false in its cancel parameter).
For examples of the use of the QTVRInstallInterceptProc function, see Listing 2-7 and Listing 4-2 in Chapter 4, "QuickTime VR Atom Containers."
You can use the QTVRCallInterceptedProc function to call an intercepted QuickTime VR function from within an intercept procedure.
OSErr QTVRCallInterceptedProc (
QTVRInstanceqtvr,
QTVRInterceptRecord*qtvrMsg);
The QTVRCallInterceptedProc function executes the QuickTime VR Manager function indicated by the selector field of the qtvrMsg intercept record. The parameters passed to that function are the QuickTime VR movie specified by the qtvr parameter and any other parameters contained in the parameter field of the qtvrMsg record. You can, if you wish, change the parameters in that field before calling QTVRCallInterceptedProc .
You can call QTVRCallInterceptedProc more than once in your intercept procedure. In addition, the QuickTime VR Manager will call the intercepted function again unless your intercept procedure returns true in its cancel parameter.
See "QuickTime VR Intercept Procedure" for information about intercept procedures. Listing 2-6 illustrates the use of QTVRCallInterceptedProc .
| Previous | Chapter Contents | Chapter Top | Next |